package d1130.r211.num06;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class StuApp {
    static List<Student> list=new ArrayList<>();   //静态调用静态
    public static void main(String[] args) {
        init();
        System.out.println("该班的平均分是"+Tools.getAvg(list));
        //分数区间的学生
        System.out.println("请输入分数区间");
        Scanner sc1=new Scanner(System.in);
        Scanner sc2=new Scanner(System.in);
        double a=sc1.nextDouble();
        double b=sc2.nextDouble();
        System.out.println("该班分数位于"+a+"到"+b+"之间的学生名单："+Tools.getScore(list,a,b));
    }
    //数据初始化
    public static void init(){
        list.add(new Student("唐凯悦","41926081",90));
        list.add(new Student("彭真","41926084",58));
        list.add(new Student("闫佳","41926022",91));
        list.add(new Student("汪龙","41926010",87));
        list.add(new Student("李安典","41926038",36));
        list.add(new Student("李泽轩","41926006",92));
    }
}
